﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home/Layouts/Home.Master" AutoEventWireup="true"
    CodeBehind="GroupBuy.aspx.cs" Inherits="Thuoc24h.Home.Pages.GroupBuy" %>

<%@ Import Namespace="CSS" %>
<%@ Import Namespace="Thuoc24h.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPLH" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainPLH" runat="server">
    <style>
        .ProductItem { float: left; margin: 12px; width: 336px; }
        .ProductItemAvatar { height: auto; float: left; width: 100%; }
        .image-product { width: 135px; overflow: hidden; float: left; }
        .product-info { float: left; width: 189px; }
        .count-buy { border: 1px solid #FFA500; text-align: center; padding: 2px 0; }
        #icon-group { background: url("/AdminCP/Layouts/Images/SmallIcon/user_group.png") no-repeat scroll 0 0 transparent; display: inline-block; height: 16px; width: 16px; }
        .group-buy { display: inline-block; border-bottom: 2px solid #ffa500; margin-bottom: 10px; padding-bottom: 10px; }
        .group-buy h1 { font-size: 14px; }
        .info { width: 348px; padding: 10px; }
        
        .price-new { color: red; font-weight: bold; font-size: 2em; text-align: center; padding-top: 50px; }
        .price-old { text-align: center; text-decoration: line-through; }
        label.dis { background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #FFA500; border-radius: 30px 30px 30px 30px; color: #FF0000; font-weight: bold; height: 40px; line-height: 40px; opacity: 0.7; position: absolute; right: 13px; text-align: center; top: 16px; width: 40px; }
        label.dis2 { background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #FFA500; border-radius: 22px 22px 22px 22px; color: #FF0000; font-weight: bold; height: 40px; left: 2px; line-height: 40px; opacity: 0.7; position: absolute; text-align: center; top: 2px; width: 40px; }
        .ProductItemView2 { background: none repeat scroll 0 0 #F1F1F1; color: #FFA500; padding: 8px 38px; }
        .ProductItemView2:hover { background: #ffa500; color: #ffffff !important; }
        .ProductItemInfo { padding: 20px 0; }
        .product-info { width: 155px; }
        .image-product { width: 170px; }
    </style>
    <h1 class="TopHeader">
        Mua chung</h1>
    <div class="ProductBlock">
        <div class="ProductBlockContent">
            <div class="group-buy">
                <asp:Repeater runat="server" ID="rptProductTop1">
                    <ItemTemplate>
                        <a class="fleft" style="position: relative; border: 1px solid #d3d3d3; padding: 2px;
                            width: 346px; overflow: hidden;" href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>">
                            <img src='<%# Eval("ThumbImage")%>' alt='<%#Eval("Name") %>' width="346px" />
                            <label class="dis">
                                -<%#Eval("DiscountPercent") %>%</label>
                        </a>
                        <div class="info fleft">
                            <h1>
                                <a style="color: #000; text-decoration: none; color: #18640F;" href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>">
                                  <%# Eval("Name") %></a>
                            </h1>
                            <p style="padding-top: 10px;">
                                <%#Eval("Description").GetLeft(120,true) %></p>
                            <p class="price-new">
                                <%#Eval("PriceDiscount").FormatMoney() %></p>
                            <p class="price-old">
                                <%#Eval("Price").FormatMoney() %></p>
                            <br />
                            <div style="text-align: center; padding-top: 10px;">
                                <a style="text-decoration: none;" href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>">
                                    <span class="ProductItemView2">Xem</span></a>
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
            </div>
            <asp:Repeater runat="server" ID="rptProductDiscount">
                <ItemTemplate>
                    <div class="ProductItem">
                        <div class="ProductItemContent">
                            <h2 class="ProductItemTitle">
                                <a style="text-decoration: none;" href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>">
                                    <%#Eval("Name") %></a>
                            </h2>
                            <div class="image-product" style="position: relative;">
                                <a href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>">
                                    <img src='<%# Eval("ThumbImage")%>' alt='<%#Eval("Name") %>' class="ProductItemAvatar" /></a>
                                <label class="dis2">
                                    -<%#Eval("DiscountPercent") %>%</label>
                            </div>
                            <div class="product-info">
                                <div class="ProductItemDescription">
                                    <a style="color: #000; text-decoration: none;" href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>">
                                        <%#Eval("Description").GetLeft(50,true) %></a>
                                </div>
                                <div class="ProductItemInfo">
                                    <table>
                                        <tr>
                                            <%--   <td>Giá
                                            </td>--%>
                                            <td>
                                                <span class="ProductPrice">
                                                    <%#Eval("PriceDiscount").FormatMoney() %></span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <%--  <td>Giá gốc
                                            </td>--%>
                                            <td>
                                                <span class="ProductSourcePrice">
                                                    <%#Eval("Price").FormatMoney() %>
                                                </span>
                                            </td>
                                        </tr>
                                        <%--  <tr>
                                            <td>Tiết kiệm
                                            </td>
                                            <td>
                                                <span class="ProductDiscount"><%#Eval("DiscountPercent") %>%</span>
                                            </td>
                                        </tr>--%>
                                    </table>
                                </div>
                                <%--  <div class="count-buy"><span id="icon-group"></span><i><%# Eval("BuyCount") ?? "0" %> người đã mua</i></div>--%>
                                <div style="text-align: center; padding-top: 10px;">
                                    <a style="text-decoration: none;" href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>">
                                        <span style="padding: 8px 16px;" class="ProductItemView2">Xem</span></a>
                                </div>
                            </div>
                            <br class="clear" />
                        </div>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
        </div>
    </div>
</asp:Content>
